package cn.csc.module.order.controller.admin.item.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;

/**
* 订单项 Base VO，提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
*/
@Data
@ToString(callSuper = true)
public class OrderItemBaseVO {

    @ApiModelProperty(value = "主键id")
    private BigInteger id;

    @ApiModelProperty(value = "店铺id", required = true)
    @NotNull(message = "店铺id不能为空")
    private BigInteger shopId;
    @ApiModelProperty(value = "店铺名称，冗余字段", required = true)
    private String shopName;
    @ApiModelProperty(value = "第三方用户id" )
    private String appUserId;

    @ApiModelProperty(value = "订单id", required = true)
    @NotNull(message = "订单id不能为空")
    private BigInteger orderId;

    @ApiModelProperty(value = "分类id")
    private String categoryId;

    @ApiModelProperty(value = "产品ID", required = true)
    @NotNull(message = "产品ID不能为空")
    private BigInteger spuId;

    @ApiModelProperty(value = "产品SkuID", required = true)
    @NotNull(message = "产品SkuID不能为空")
    private BigInteger skuId;

    @ApiModelProperty(value = "用户Id", required = true)
    @NotNull(message = "用户Id不能为空")
    private BigInteger userId;

    @ApiModelProperty(value = "购物车产品个数")
    private Integer count;

    @ApiModelProperty(value = "产品名称")
    private String spuName;

    @ApiModelProperty(value = "sku名称")
    private String skuName;

    @ApiModelProperty(value = "产品主图片路径", required = true)
    @NotNull(message = "产品主图片路径不能为空")
    private String pic;

    @ApiModelProperty(value = "单个orderItem的配送类型1.快递物流(默认）,2.送货上门,3.自提")
    private Integer deliveryType;

    @ApiModelProperty(value = "加入购物车时间")
    private LocalDateTime shopCartTime;

    @ApiModelProperty(value = "产品价格", required = true)
    private BigDecimal price;

    @ApiModelProperty(value = "商品总金额", required = true)
    private BigDecimal spuTotalAmount;

    @ApiModelProperty(value = "订单状态", required = true)
    private BigDecimal orderStatus;
    @ApiModelProperty(value = "发货附件信息", required = true)
    private String deliveryFile;
    @ApiModelProperty(value = "发货时间", required = true)
    private LocalDateTime deliveryTime;
    @ApiModelProperty(value = "完成时间", required = true)
    private LocalDateTime finallyTime;
    @ApiModelProperty(value = "订单类型 0普通订单，1采购商订单", required = true)
    private Integer orderType;
    @ApiModelProperty(value = "运费备注", required = true)
    private String freightRemark;
    @ApiModelProperty(value = "买家手机号", required = true)
    private String memberPhone;
    @ApiModelProperty(value = "支付时间", required = true)
    private LocalDateTime payTime;
    @ApiModelProperty(value = "支付类型，0微信支付、1购物卡支付、2结合支付")
    private Integer payType;

    @ApiModelProperty(value = "实付金额")
    private BigDecimal spuActualAmount;

    @ApiModelProperty(value = "购物卡支付金额")
    private BigDecimal cardPayAmount;

    @ApiModelProperty(value = "使用的购物卡id")
    private Integer cardId;

}
